package com.ontheroad.mysql.user.service;

import java.util.Date;
import java.util.HashMap;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.modoumama.service.base.impl.BaseServiceImpl;

import com.ontheroad.mysql.user.mapper.HeartbeatMapper;
import com.ontheroad.user.model.HeartbeatEntity;
import com.ontheroad.user.service.HeartbeatService;
import com.ontheroad.utils.UUIDUtil;

/*import com.ontheroad.utils.SmsUtil;*/

@Service
@Transactional
public class HeartbeatServiceImpl extends BaseServiceImpl<HeartbeatEntity, String>
		implements HeartbeatService {

	private Logger log = LoggerFactory.getLogger(getClass());

	@Autowired
	private HeartbeatMapper heartbeatMapper;
	
	public HashMap<String, Object> insertHeart(HeartbeatEntity heartbeatEntity)
			throws Exception {
		HashMap<String, Object> bean  =new HashMap<String, Object>();
		log.info("用户注册");
		heartbeatEntity.setId(UUIDUtil.generate());
		heartbeatEntity.setCreateTime(new Date());
		heartbeatMapper.insertModel(heartbeatEntity);
		bean.put("code", 0);
		bean.put("message", "success");
		return bean;
	}

	

}
